package com.android.phoenix.fragments.offlinemap;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.android.phoenix.R;
import com.android.phoenix.adapters.MyOfflineMapCityListAdapter;

public class OfflineMapDownloadFragment extends Fragment {
	private final static String[] testCitys = new String[] { "武汉", "北京", "上海",
			"广州", "深圳" };

	private ListView lvDownloadCity = null;
	private MyOfflineMapCityListAdapter mDownloadAdapter = null;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.fra_offlinemap_download, container,
				false);
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		initViews();
	}

	private void initViews() {
		lvDownloadCity = (ListView) getActivity().findViewById(
				R.id.lvDownloadCity);
		mDownloadAdapter = new MyOfflineMapCityListAdapter(getActivity(),
				testCitys);
		lvDownloadCity.setAdapter(mDownloadAdapter);
	}
}
